//
//  AppDelegate.h
//  xmpp即时通信
//
//  Created by student on 16/1/22.
//  Copyright © 2016年 123. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum {
    BlockResultLoginSuccess,
    BlockResultLoginFail,
    BlockResultLoginTimeOut
}BlockResultLoginType;

typedef void(^ResultBlock)(BlockResultLoginType type);

typedef void(^userBlock)(NSString *user);

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (nonatomic ,copy) NSString *password;

@property (nonatomic ,copy) NSString *name;

@property (nonatomic ,assign,getter=isLogin) BOOL login;

/**
 *  连接服务器
 */
- (void)connectToServer:(ResultBlock)resultBlock;


/**
 *  与服务断开连接
 */

- (void)disConnectToServer;

- (void)sendUsername:(userBlock)userBlock;

@end

